package com.moss.system.mapper;


import com.moss.common.domain.LoginUser;
import com.moss.common.entity.SysMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MenuMapper {

    List<SysMenuEntity> selectList();

    List<String> selectMenuPermsByUserId(String userId);

    List<SysMenuEntity> selectMenuTreeAll();

    List<SysMenuEntity> selectMenuListByUserId(String userId);

    List<SysMenuEntity> selectMenuListByUserId(@Param("menu") SysMenuEntity menu,@Param("userId") String userId);

    List<SysMenuEntity> selectMenuList(@Param("m") SysMenuEntity menu);

    List<Long> selectMenuIdListByRoleId(Long roleId);

    SysMenuEntity selectMenuById(Long menuId);

    SysMenuEntity selectMenuByName(@Param("menuName") String menuName, @Param("parentId") Long parentId);

    void insert(@Param("m") SysMenuEntity menu);

    void updateById(@Param("m") SysMenuEntity menu);

    boolean hasChildren(Long menuId);

    boolean checkMenuExistRole(Long menuId);
}
